Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

feat(nuxt)!: add NuxtPage to #components #8145

Merged
merged 5 commits into from
Oct 14, 2022

Conversation

huang-julien
Copy link
Member

πŸ”— Linked issue

resolve nuxt/nuxt#14876

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

Hi πŸ™‚ , this PR adds NuxtPage component to #components

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@codesandbox
Copy link

codesandbox bot commented Oct 12, 2022

CodeSandbox logoCodeSandbox logoΒ  Open in CodeSandbox Web Editor | VS Code | VS Code Insiders

@netlify
Copy link

netlify bot commented Oct 12, 2022

βœ… Deploy Preview for nuxt3-docs canceled.

Name Link
πŸ”¨ Latest commit 6beb099
πŸ” Latest deploy log https://app.netlify.com/sites/nuxt3-docs/deploys/6348979d5769a900092ef0c7

Comment on lines 160 to 164
// Add <NuxtPage>
addComponent({
name: 'NuxtPage',
filePath: resolve(distDir, 'pages/runtime/page')
})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should probably only be done in the pages module instead (packages/nuxt/src/pages/module.ts) - this should not be added if the pages module isn't enabled.

note that we manually register the component here:

nuxtApp.vueApp.component('NuxtPage', NuxtPage)
// TODO: remove before release - present for backwards compatibility & intentionally undocumented
nuxtApp.vueApp.component('NuxtNestedPage', NuxtPage)
nuxtApp.vueApp.component('NuxtChild', NuxtPage)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes of course πŸ˜… .
With the components loader, is the manual register still needed ? πŸ€”

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, let's try removing it 🀯 But let's manually import in the default app.vue file...

We've just done a very similar thing in #8167 (review).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the release should happens soon (i hope so πŸ˜„), what do you think about removing NuxtChild and NuxtChild too ?

Do you mean this one

with a manual import from #components ?

Copy link
Member

@danielroe danielroe Oct 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed about removing deprecated components. I would do a manual relative import.

@danielroe danielroe self-requested a review October 13, 2022 08:46
@danielroe danielroe changed the title feat(nuxt): add NuxtPage to #components feat(nuxt)!: add NuxtPage to #components Oct 13, 2022
@pi0 pi0 merged commit 23ad303 into nuxt:main Oct 14, 2022
@pi0
Copy link
Member

pi0 commented Oct 14, 2022

Thanks!

@pi0 pi0 mentioned this pull request Oct 18, 2022
@danielroe danielroe added the 3.x label Jan 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

components.d.ts file does not contain NuxtPage components
3 participants